/*
 * Copyright (c) 2005, 2014 vacoor
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 */
package org.vacoor.nothing.misc.express.model;

import java.util.Arrays;

/**
 * @author vacoor
 */
public class Address extends ErrorObject {
    private String id;
    private String name;
    private String company;
    private String[] streets;    // 街道
    private String zip;          // 邮编
    private String city;         // 城市
    private String state;        // 省/州代码
    private String country;      // 国家代码
    /*
    public String phone;
    public String email;
    public String message;
    */

    /* **********************
     *       Factory
     * **********************/

    public static Address create() {
        return new Address();
    }

    //
    public String getId() {
        return id;
    }

    public Address setId(String id) {
        this.id = id;
        return this;
    }

    public String getName() {
        return name;
    }

    public Address setName(String name) {
        this.name = name;
        return this;
    }

    public String getCompany() {
        return company;
    }

    public Address setCompany(String company) {
        this.company = company;
        return this;
    }

    public String[] getStreets() {
        return streets;
    }

    public Address setStreets(String[] streets) {
        this.streets = streets;
        return this;
    }

    public String getZip() {
        return zip;
    }

    public Address setZip(String zip) {
        this.zip = zip;
        return this;
    }

    public String getCity() {
        return city;
    }

    public Address setCity(String city) {
        this.city = city;
        return this;
    }

    public String getState() {
        return state;
    }

    public Address setState(String state) {
        this.state = state;
        return this;
    }

    public String getCountry() {
        return country;
    }

    public Address setCountry(String country) {
        this.country = country;
        return this;
    }

    @Override
    public String toString() {
        return "Address{" +
                "id='" + id + '\'' +
                ", name='" + name + '\'' +
                ", company='" + company + '\'' +
                ", streets=" + Arrays.toString(streets) +
                ", zip='" + zip + '\'' +
                ", city='" + city + '\'' +
                ", state='" + state + '\'' +
                ", country='" + country + '\'' +
                ", error='" + message + '\'' +
                '}';
    }
}
